package com.aiyige.model.request;

/**
 * Created by xiachao on 2017/10/20.
 */
public class LoginOtherRequest {

    private String uid;

    private String openid;

    private String accessToken;

    private String nickName;

    private String country;

    private String province;

    private String city;

    private String sex;

    private String avatar;

    private int type;

    private LoginOtherRequest(Builder builder) {
        uid = builder.uid;
        openid = builder.openid;
        accessToken = builder.accessToken;
        nickName = builder.nickName;
        country = builder.country;
        province = builder.province;
        city = builder.city;
        sex = builder.sex;
        avatar = builder.avatar;
        type = builder.type;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getUid() {
        return uid;
    }

    public String getOpenid() {
        return openid;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public String getNickName() {
        return nickName;
    }

    public String getCountry() {
        return country;
    }

    public String getProvince() {
        return province;
    }

    public String getCity() {
        return city;
    }

    public String getSex() {
        return sex;
    }

    public String getAvatar() {
        return avatar;
    }

    public int getType() {
        return type;
    }

    @Override
    public String toString() {
        return "LoginOtherRequest{" +
                "uid='" + uid + '\'' +
                ", openid='" + openid + '\'' +
                ", accessToken='" + accessToken + '\'' +
                ", nickName='" + nickName + '\'' +
                ", country='" + country + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", sex='" + sex + '\'' +
                ", avatar='" + avatar + '\'' +
                ", type=" + type +
                '}';
    }

    public static final class Builder {
        private String uid;
        private String openid;
        private String accessToken;
        private String nickName;
        private String country;
        private String province;
        private String city;
        private String sex;
        private String avatar;
        private int type;

        private Builder() {
        }

        public Builder uid(String uid) {
            this.uid = uid;
            return this;
        }

        public Builder openid(String openid) {
            this.openid = openid;
            return this;
        }

        public Builder accessToken(String accessToken) {
            this.accessToken = accessToken;
            return this;
        }

        public Builder nickName(String nickName) {
            this.nickName = nickName;
            return this;
        }

        public Builder country(String country) {
            this.country = country;
            return this;
        }

        public Builder province(String province) {
            this.province = province;
            return this;
        }

        public Builder city(String city) {
            this.city = city;
            return this;
        }

        public Builder sex(String sex) {
            this.sex = sex;
            return this;
        }

        public Builder avatar(String avatar) {
            this.avatar = avatar;
            return this;
        }

        public Builder type(int type) {
            this.type = type;
            return this;
        }

        public LoginOtherRequest build() {
            return new LoginOtherRequest(this);
        }
    }
}
